xen/arm64: fix stack dump in show_trace
authorIan Campbell <ian.campbell@citrix.com>
Tue, 4 Jun 2013 10:54:10 +0000 (11:54 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 13 Jun 2013 16:42:13 +0000 (17:42 +0100)
commit97e3e84c6dfa94f09b97d21454d4252fc3c190d8
treedcbcec21405d17a2ef6b503b26527a7f9aa00031
parent0c6781ee6a5f0df55eab6be8a92853d3154c0c7b
xen/arm64: fix stack dump in show_trace

On aarch64 the frame pointer points to the next frame pointer and the return
address is the previous stack slot (so below on the downward growing stack,
therefore above in memory):

       |<RETURN ADDR>      ^addresses grow up
 FP -> |<NEXT FP>          |
       |                   |
       v                   |
       stack grows down.

This is contrary to aarch32 where the frame pointer points to the return
address and the next frame pointer is the next stack slot (so above on the
downward growing stack, below in memory):

 FP -> |<RETURN ADDR>       ^addresses grow up
       |<NEXT FP>           |
       |                    |
       v                    |
       stack grows down.

In addition print out LR as part of the trace, since it may contain the
penultimate return address e.g. if the ultimate function is a leaf function.

Lastly nuke some unnecessary braces.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen/arch/arm/traps.c